package prosjekt;

/**
 * 
 * @author Hilde
 *
 */
public class Ordre {
	private int ordreID;
	private int kundeID;	
	private int dato;
	private int ferdig;
	private int levering;
	private Produkt[] produkter;
	private String kundeNavn;
	

	public Ordre(int ordreID,int kundeID, int dato, int ferdig, int levering ) {

		this.ordreID = ordreID;
		this.kundeID = kundeID;
		this.dato = dato;
		this.ferdig = ferdig;
		this.levering = levering;
		this.produkter = new Produkt[0];
		this.kundeNavn = "";
		
	}
	
	public Ordre(int ordreID,int kundeID, int dato, int ferdig, int levering,String kundeNavn, Produkt[] produkter ) {

		this.ordreID = ordreID;
		this.kundeID = kundeID;
		this.dato = dato;
		this.ferdig = ferdig;
		this.levering = levering;
		this.produkter = produkter;
		this.kundeNavn = kundeNavn;
	}
	
	/**
	 * returns the costumer`s name 
	 * @return - String, the name of the costumer
	 */
	public String getKundeNavn(){
		return kundeNavn;
	}

	/**
	 * returns the costumer number of the costumer
	 * @return - int, the costumer number for the costumer
	 */
	public int getKundenr() {
		return kundeID;
	}

	/**
	 * sets the costumer number of the costumer
	 * @return - int, the costumer number for the costumer
	 */
	public void setKundenr(int kundenr) {
		this.kundeID = kundenr;
	}

	/**
	 * returns the order number of the order
	 * @return - int, the order number for the order
	 */
	public int getOrdreID() {
		return ordreID;
	}
	/**
	 * returns the date of the order
	 * @return - int, the date for the order
	 */
	public int getdato() {
		return dato;
	}
	/**
	 * returns the finished of the order
	 * @return - int, the finished for the order
	 */
	public int getFerdig() {
		return ferdig;
	}
	/**
	 * returns the delivery of the order
	 * @return - int, delivery for the order
	 */
	public int getLevering() {
		return levering;
	}
	
	/**
	 * returns the products asosiated with this order
	 * @return - Produkt[], the products asosiated with this order
	 */
	public Produkt[] getProdukter() {
		return produkter;
	}
	
	public String toString(){
		return "Ordre ID:"+ordreID +" | " +
			"Kunde ID:"+kundeID+" | "+ "dato:"+dato+
			"ferdig:" + ferdig + " | " + "levering:" + levering +  "\n";
	}	

}


